const fetch =require("node-fetch");

const headers={
    'x-model-raw':'iPad11,6',
    'x-screen-width':'810',
    'x-is-new-device':'false',
    'x-timestamp':1660137210343,
    'x-session-id':1660165995,
    'x-bundleId':'com.gotokeep.keep',
    'x-os':'iOS',
    'x-keep-timezone':'Asia/Shanghai',
    'x-device-id':'b1649a41cca84e39a28bf6f11d6163f42ce93210',
    'x-os-version':'15.5',
    'x-channel':'Apple Store',
    'x-ads':'t+hYqChY4ARhmxPXDN/WRwq5xhZik+F499whdZp/cAoZHRB6iylwYOujWKsDhvnPZNkYjxiMt+7ezjryvUxN9R6MVw9bn4m/TMdeaOkYtOGi/G8ltAbuyRNz15ugLzeBf3d1cJgjWjaydE1fUD8t62/N8J03CTZ3peVlQ4mXtM5/NlvRLt+5LfTJU4Yauy5RS+0yj72MO/SvLPGx4OxuyFKS7Sd/91jECykIHd9f2JCALUJQcGGK7mkeRzxd3XWAXcM2TfgzHEz8zYUanmoVYgDtcqehgYsjfrsVioyu1wHluvmWvZQPrhD7fDxj9Or0/8Z+0LhK2WTJx1/XHh53yiJC743w+CovjHBwbJMmBfZA8EGPKFTkYPM7OQmmHwKE+zogkG8SZ0JoX6xOm+sRsY0rDMWNHBOL8gYCREGROfeov3kj5BtLJ44eLds4HfA76whTuJCCLR1Bib2n1TBOdBVEKG3ThsU6d6CqObBQOihdrOtLdKg6zIOauBIqBwq7qJfwJzzeEPtqtZhsrMVltg==',
    'x-model':'iPad (8th)',
    'x-locale':'zh-Hans-CN',
    'x-version-code':37595,
    'x-is-guest':'Y',
    'x-version-name':'7.32.0',
    'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI2MmYzOTYyMWUyY2ZlODAwMDFlOTg4NGUiLCJ1c2VybmFtZSI6IueUqOaIt2dxM3AzdGxqdiIsIl92IjoiMSIsIl9lZCI6InJGalZQYWpObEJpY2lMMjd6QzZnU0hLN3BVck1ZQWpXVW1wS2pML1R0T0xlRWk0ZnIyMjBwdU9iM1BKOFJTeTYiLCJnZW5kZXIiOiJNIiwiZGV2aWNlSWQiOiIiLCJndWVzdCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly93d3cuZ290b2tlZXAuY29tLyIsImV4cCI6MTY4MzQ2MDIxNCwiaWF0IjoxNjYwMTMyMjE0fQ.atKiSXEPkw3jBVctbIQ998-9D-kXYdYOG8HXJPdBuvU',
    'x-flutter-plugin-version':'0.9.0',
    'x-user-id':'62f39621e2cfe80001e9884e',
    'x-carrier':0,
    'x-connection-type':2,
    'x-manufacturer':'Apple',
    'x-screen-height':1080,
    'x-app-platform':'keepapp'
}
const URL_HOMEPAGE=
    'https://api.gotokeep.com/homepage/v4/tab';

const fetchHomePage=()=>{
    return fetch(URL_HOMEPAGE,{headers:headers})
        .then(res=>res.json())
        .then(json=>json)
}

module.exports={
    fetchHomePage
}

